<?php
class UtilhDeprated
{
	//此方法用于输出gzip压缩数据
	function ob_gzip($content){
		if(!headers_sent() && extension_loaded('zlib') && strstr($_SERVER['HTTP_ACCEPT_ENCODING'],'gzip'))
		{
			$content = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $content);
			$content = gzencode($content,9);
			
			header('Content-Encoding:gzip');
			header("Vary:Accept-Encoding");
			
			header('Content-Length:'.strlen($content));
		
		
		}
		return $content;
	}
}
?>